package com.wanmait.recycle.service;

import com.github.pagehelper.PageInfo;
import com.wanmait.recycle.pojo.Answer;

public interface AnswerService extends CommonService<Answer> {

	void addAnswer(Answer answer);

	void isPick(Answer answer);

	/*前台获得enable为1的所有回答 AD 03.13*/
	PageInfo<Answer> findEnableAnswer();
	/*根据Id查看某一篇文章*/
	Answer findByAnswerId(Integer id);
	/*判断某用户是否对某文章点赞*/
	boolean isPraise(Integer answerId,Integer userinfoId);
	/*点赞*/
	void addPraise(Integer answerId,Integer userinfoId);
	/*取消点赞*/
	void removePraise(Integer answerId,Integer userinfoId);
	/*同步队列*/
	void processQueue();
	/*同步每篇文章的点赞数量*/
	void processPraiseCount();
}
